package cn.fsd.vo;

import cn.fsd.domain.CommodityClass;
import java.util.ArrayList;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
/**
 * 商品分类树结点
 */
public class ClassTreeRoot extends ClassTreeNode {

  private List<ClassTreeNode> children = new ArrayList<>();

  public ClassTreeRoot(CommodityClass commodityClass) {
    this.setClassId(commodityClass.getClass_id());
    this.setLevel(commodityClass.getClass_category());
    this.setName(commodityClass.getClass_name());
  }

}
